<extend name="layout/main" />

<block name="HEADER">
	
</block>

<block name="CONTENT">
	<control:grid  id="grid" padding="0" />
</block>

<block name="FOOTER">
	<script type="text/javascript">
		var page = (function(ns){
     
		    //页面初始化
		    ns.init=function(){

		    }
		    
		    //一键生成
            ns.create=function(){
                $.confirm("将会清空views/systemSheet目录，确认生成？",function(index){
                    $.ajaxs("/admin/soft/page_create/create").then(function(res){
                        $.alert(1,"生成成功，请留意导航上的系统目录，文件放置于views/systemSheet中！",function(){
                            window.location.href = window.location.href;
                        });
                    });
                });
            }
            
		    //查看信息
            ns.seeInfo=function(name){
                var filter = {
                    url: $.getModule('fieldInfo'),
                    table_name:name
                }
                $.openIframe(filter, "字段信息",['800px', '520px']);
            }
		    
		    //查看信息
            ns.seePage=function(url){
                $.openFullWin({ url:url }, "页面查看",['95%', '95%']);
            }
		    
		    //添加到用户菜单
		    ns.insertUserMenu=function(table_names,url,comments){
		        var filter = {
                    url: $.getModule('insertUserMenu'),
                    mode:1,
                    nav_name:$.trim(comments || table_names),
                    nav_url:url.replace('systemSheet','modules'),
                    from_name:table_names
                }
                $.openIframe(filter, "添加到用户菜单",['500px', '520px']);
            }
		    
		    return ns;
		}({}));
		
		$(function(){ page.init();  });
	</script>
</block>